< Prev(J) / Next(K) > / View :

Filename: /text/shared/guide/scripting.xhp

(bookmark: bm_id5277565)
assigning scripts
programming;scripting
form controls;assigning macros
pictures;assigning macros
hyperlinks;assigning macros
shortcut keys;assigning macros
controls;assigning macros (Basic)
menus;assigning macros
events;assigning scripts

[PO-fuzzy@shared\guide.po] スクリプトの割り当て
プログラミング;スクリプティング
フォームコントロール;マクロの割り当て
図;マクロの割り当て
ハイパーリンク;マクロの割り当て
ショートカットキー;マクロの割り当て
コントロール;マクロの割り当て (Basic)
メニュー;マクロの割り当て
イベント;マクロの割り当て

(variable: scripting)Assigning Scripts in Office
(variable: scripting)Office のスクリプトの割り当て(par_idN1070A.)

You can assign custom scripts (macros) to menu items, icons, dialog controls, and events in Office.
Office のメニュー項目、アイコン、ダイアログコントロール、およびイベントにカスタムスクリプト (マクロ) を割り当てることができます。(par_idN10728.)

Office internally supports the following scripting languages:
Office では、以下のスクリプト言語がサポートされています。(par_idN1072B.)

  1. Office Basic
    Office Basic(par_idN10731.)

  2. JavaScript
    JavaScript(par_idN10739.)

  3. BeanShell
    BeanShell (Java)(par_idN1073D.)

  4. Python
    [PO-fuzzy@shared\guide.po] ※※※未訳※※※(par_id6797082.)

In addition, developers can use high-level languages, for example Java programming language, to control Office externally. See the API project at OpenOffice.org.
また開発者は、Java プログラミング言語などの高級言語を使用して、Office を外部から制御できます。OpenOffice.org の API プロジェクトを参照してください。(par_idN1091F.)

To assign a script to a new menu entry
新しいメニュー項目にスクリプトを割り当てるには(par_idN10751.)

  1. Choose Tools - Customize, and click the Menus tab.
    ツール → カスタマイズ を選択し、メニュー タブをクリックします。(par_idN10758.)

  2. Click Add.
    コマンドの追加 をクリックします。(par_idN1093D.)

  3. In the Category list box, scroll down and open the "Office Macros" entry.
    カテゴリ リストボックスをスクロールさせて、「Office マクロ」項目を開きます。(par_idN10760.)

  4. You see entries for "Office Macros" (scripts in the share directory of your Office installation), "My Macros" (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.
    項目として、「Office マクロ」(ご使用の PRODUCTNAME インストールの共有ディレクトリ中のスクリプト)、「マイマクロ」(ユーザーディレクトリ中のスクリプト)、および現在のドキュメントが表示されます。いずれか 1 項目を開いて、サポートされているスクリプト言語を参照してください。(par_idN10768.)

  5. Open any scripting language entry to see the available scripts. Select a script.
    任意のスクリプト言語項目を開いて、使用可能なスクリプトを参照します。スクリプトを選択します。(par_idN1076C.)

  6. A list of the script functions appears in the Commands list box. Select a function.
    スクリプト関数のリストが、コマンド リストボックスに表示されます。関数を 1 つ選択します。(par_idN10770.)

  7. Click Add to create a new menu assignment. The new menu entry appears in the Entries list box.
    追加 をクリックしてメニューに新しい項目を割り当てます。新しいメニュー項目は項目のリストボックスに現れます。(par_idN10778.)

To assign a script to a key combination
キーコンビネーションにスクリプトを割り当てるには(par_idN10783.)

  1. Choose Tools - Customize - Keyboard.
    ツール → カスタマイズ → キーボード を選択(par_idN10787.)

  2. In the Category list box, scroll down and open the "Office Macros" entry.
    カテゴリ リストボックスをスクロールさせて、「Office マクロ」項目を開きます。(par_idN10A59.)

  3. You see entries for "Office Macros" (scripts in the share directory of your Office installation), "My Macros" (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.
    項目として、「Office マクロ」(ご使用の PRODUCTNAME インストールの共有ディレクトリ中のスクリプト)、「マイマクロ」(ユーザーディレクトリ中のスクリプト)、および現在のドキュメントが表示されます。いずれか 1 項目を開いて、サポートされているスクリプト言語を参照してください。(par_idN10A61.)

  4. Open any scripting language entry to see the available scripts. Select any script.
    いずれかのスクリプト言語項目を開いて、使用可能なスクリプトを参照します。任意のスクリプトを選択します。(par_idN10A65.)

  5. A list of the script functions will appear in the Commands list box. Select any function.
    スクリプト関数のリストが、関数 リストボックスに表示されます。任意の関数を選択します。(par_idN10A69.)

  6. Click the option button for Office or Writer (or whichever application is currently open).
    Office または Writer (または、現在開いているいずれかのアプリケーション) 用のオプションボタンをクリックします。 (par_idN10A71.)

    Selecting the option button sets the scope of the new key combination to be applicable in all of Office or only in documents of the current module.
    新しいキーコンビネーションの適用範囲を、Office 全体にするのか、現在のモジュールのドキュメント内のみにするのかを設定するオプションボタンを選択します。(par_idN10A74.)

  7. Select a key combination from the Shortcut keys list box and click Modify.
    ショートカットキー リストボックスから、キーコンビネーションを選択して、変更 をクリックします。(par_idN10A78.)

To assign a script to an event
イベントにスクリプトを割り当てるには(par_idN1078A.)

  1. Choose Tools - Customize - Events.
    ツール → カスタマイズ → イベント を選択(par_idN1078E.)

  2. Click Macro button.
    マクロ ボタンをクリックします。(par_idN10A16.)

  3. In the Library list box, scroll down and open the "Office Macros" entry.
    ライブラリ リストボックスをスクロールさせて、「Office マクロ」項目を開きます。(par_idN10A9E.)

  4. You see entries for "Office Macros" (scripts in the share directory of your Office installation), "My Macros" (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.
    項目として、「Office マクロ」(ご使用の PRODUCTNAME インストールの共有ディレクトリ中のスクリプト)、「マイマクロ」(ユーザーディレクトリ中のスクリプト)、および現在のドキュメントが表示されます。いずれか 1 項目を開いて、サポートされているスクリプト言語を参照してください。(par_idN10AA6.)

  5. Open any scripting language entry to see the available scripts. Select any script.
    いずれかのスクリプト言語項目を開いて、使用可能なスクリプトを参照します。任意のスクリプトを選択します。(par_idN10AAA.)

  6. A list of the script functions will appear in the Assigned Action list box. Select any function.
    スクリプト関数のリストが、割り当て済みアクション リストボックスに表示されます。任意の関数を選択します。(par_idN10AAE.)

  7. Select to save in Office or current document.
    Office 内に保存するのか、現在のドキュメント内に保存するのかを選択します。(par_idN10AB6.)

    This sets the scope of the new event assignment to be applicable in all of Office or only in documents of the current module.
    これによって、新しいイベント割り当ての適用範囲を、Office 全体にするのか、現在のモジュールのドキュメント内のみにするのかを設定します。(par_idN10AB9.)

  8. Select an event from the list and click OK.
    リストからイベントを 1 つ選択して、割り当てる をクリックします。(par_idN10ABD.)

To assign a script to an event for an embedded object
組み込みオブジェクトのイベントにスクリプトを割り当てるには(par_idN10791.)

  1. Select the embedded object, for example a chart, in your document.
    ドキュメント内の組み込みオブジェクト、たとえば図を選択します。(par_idN10795.)

  2. Choose Format - Frame/Object - Macro.
    書式 → 枠/オブジェクト → マクロ タブを選択(par_idN10ADB.)

  3. In the Macros list box, open the Office Scripts entry.
    マクロ リストボックスの「Office スクリプト」項目を開きます。(par_idN10ADF.)

  4. You see entries for share (scripts in the share directory of your Office installation), user (scripts in the user directory), and the current document. Open any one of them to see the supported scripting languages.
    項目として、共有用 (ご使用の PRODUCTNAME インストールの共有ディレクトリ中のスクリプト)、ユーザー用 (ユーザーディレクトリ中のスクリプト)、および現在のドキュメントが表示されます。いずれか 1 項目を開いて、サポートされているスクリプト言語を参照します。(par_idN10AE7.)

  5. Open any scripting language entry to see the available scripts. Select any script.
    いずれかのスクリプト言語項目を開いて、使用可能なスクリプトを参照します。任意のスクリプトを選択します。(par_idN10AEB.)

  6. A list of the script functions will appear in the Existing macros in list box. Select any function.
    スクリプト関数のリストが、対象内の既存マクロ リストボックスに表示されます。任意の関数を選択します。(par_idN10AEF.)

  7. Select an event from the list and click OK.
    リストからイベントを 1 つ選択して、割り当てる をクリックします。(par_idN10AF7.)

To assign a script to a hyperlink
ハイパーリンクにスクリプトを割り当てるには(par_idN10798.)

  1. Position the cursor inside the hyperlink.
    ハイパーリンク内にカーソルを置きます。 (par_idN1079C.)

  2. Choose Insert - Hyperlink.
    挿入 → ハイパーリンク を選択(par_idN10B15.)

  3. Click the Events button.
    イベント ボタンをクリックします。(par_idN10B19.)

  4. Select and assign as stated above.
    上記の解説通りに選択および割り当てを行なってください。(par_idN10B21.)

To assign a script to a graphic
図にスクリプトを割り当てるには(par_idN1079F.)

  1. Select the graphic in your document.
    ドキュメント内の図を選択します。 (par_idN107A3.)

  2. Choose Format - Picture - Macro.
    書式 → 画像 → マクロ を選択します。(par_idN10B3B.)

  3. Select and assign as stated above.
    上記の解説通りに選択および割り当てを行なってください。(par_idN10B3F.)

To assign a script to a form control
フォームコントロールにスクリプトを割り当てるには(par_idN107A6.)

  1. Insert a form control, for example a button: Open the Form Controls toolbar, click the Push Button icon, drag open a button on your document.
    ボタンなどのフォームコントロールを挿入するには、フォームコントロール ツールバーを開き、ボタン アイコンをクリックしてから、ドキュメントにボタンをドラッグします。(par_idN107AA.)

  2. With the form control selected, click Control on the Form Controls toolbar.
    フォームコントロールを選択した状態で、フォームコントロール ツールバーの コントロール をクリックします。(par_idN10B59.)

  3. Click the Events tab of the Properties dialog.
    プロパティーダイアログの イベント タブをクリックします。(par_idN10B5D.)

  4. Click one of the ... buttons to open a dialog where you can assign a script to the selected event.
    ... ボタンの 1 つをクリックするとダイアログが表示され、選択したイベントにスクリプトを割り当てることができます。(par_idN10B61.)

To assign a script to a control in the Office Basic dialog
Office Basic ダイアログのコントロールにスクリプトを割り当てるには(par_idN107AD.)

  1. Open the Office Basic dialog editor, then create a dialog with a control on it.
    Office Basic ダイアログエディタを開き、エディタ上のコントロールを使用してダイアログを作成します。(par_idN107B1.)

  2. Right-click the control, then choose Properties.
    コントロールを右クリックして、プロパティー を選択します。(par_idN10B7F.)

  3. Click the Events tab of the Properties dialog.
    プロパティーダイアログの イベント タブをクリックします。(par_idN10B87.)

  4. Click one of the ... buttons to open a dialog where you can assign a script to the selected event.
    ... ボタンの 1 つをクリックするとダイアログが表示され、選択したイベントにスクリプトを割り当てることができます。(par_idN10B8B.)


< Prev / Next >